<?php

echo "<?xml version='1.0' encoding='UTF-8'?>";

$con = mysql_connect("localhost","cubeMass_f","cubeSelectNow");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
  
mysql_select_db("cubeMass", $con);

	$nowTime = date("Y-m-d H:i:s");
	
	$sql = "SELECT * FROM model ORDER BY ID DESC";
	$result = mysql_query($sql,$con);
	
	$modelDivCon = "<div class='contentList_container'>";
	while($row = mysql_fetch_array($result)){
		$modelList = "<div class='contentListBlock'>
						<a href='http://www.eizia.com/cube/".$row['ID'].".html'>
							<span class='imgSpan_150x100'>
								<img class='imgSpan_150x100' title='".$row['name']." alt ='".$row['description']."'' src='http://www.eizia.com/photo/".$row['ID']."_small.png'> 
							</span>
							<span class='nameSpan_150x100' title = '".$row['name']."'>".$row['name']."</span>
						</a>
					</div>";
		$modelDivCon = $modelDivCon."". $modelList;
		};
	
	$modelDivCon = $modelDivCon."</div>";
	
	$html_code = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
				<html xmlns="http://www.w3.org/1999/xhtml">
				<head>
				<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
				<meta name="keywords" content="模型展示 web3d建模 web3d应用 web3d程序 O3d建模 o3d程序 o3d应用 在线建模 DIY模型 方块模型 色彩方块 应用型互联网网站" />
				<meta name="description" content="eizia所有三维方块模型的展示页面，从这里找到你喜欢的三维模型吧。我们为你提供最方便的互联网在线建模系统，即使没有基础一样能够轻松搞定，DIY只属于你自己的有趣的方块模型吧"/>
				<title>全部模型展示页面 eizia为你提供最方便快捷的建模体验，最自由的方块建模系统！</title>
				
				<link type="text/css" rel="stylesheet" href="http://www.eizia.com/icss/global.css" />
				
				</head> 
				<body id="body">
				
				<div id="content" >
					<div id="content_title">
						<a href="http://www.eizia.com/home.html" id="logo-container">
						  <h1 id="logo">
							 <span>eizia,自由创造与分享！</span>
						  </h1>
						</a>
						<div id="content_line"></div>
					</div>
					'.$modelDivCon.'
				</div>
				
				<div id="userTabs"></div>
							
				<div id="clear"><a href="http://www.eizia.com/about.html">eizia</a> 2009-2010 版权所有</div>
				
				
				<script type="text/javascript" src="http://js.tongji.linezing.com/1305450/tongji.js"></script><noscript><a href="http://www.linezing.com"><img src="http://img.tongji.linezing.com/1305450/tongji.gif"/></a></noscript>
					
					<script type="text/javascript">
					var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
					document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
					</script>
					<script type="text/javascript">
					try {
					var pageTracker = _gat._getTracker("UA-15783668-1");
					pageTracker._trackPageview();
					} catch(err) {}</script>
				
				</body>
				</html>
					';
	
	$html_file = fopen("all.html","w+");
	fwrite($html_file,$html_code);
	fclose($html_file);

mysql_close($con);


?>